import request from '@/request/index.js';

// export function submitAskDiagnosis(data) {
// 	return request.post({
// 		url: '/app-api/prescription/order-prescription/apply-after-sales',
// 		data: data || {},
// 		custom: {
// 			title: "处方退款",
// 			authentication: true
// 		}
// 	});
// }

export function cancelPrescription(params) {
	return request.post({
		url: '/app-api/prescription/order-prescription/cancel-prescription',
		params: params || {},
		custom: {
			title: "取消处方",
			authentication: true
		}
	});
}

export function againApplyPrescription(params) {
	return request.post({
		url: '/app-api/prescription/order-prescription/apply-continue-prescription',
		params: params || {},
		custom: {
			title: "处方续方申请",
			authentication: true
		}
	});
}

export function confirmPrescriptionOrderReceive(params) {
	return request.post({
		url: '/app-api/prescription/order-prescription/affirm-prescription',
		params: params || {},
		custom: {
			title: "处方确认收货",
			authentication: true
		}
	});
}

export function payPrescription(data) {
	return request.post({
		url: '/app-api/prescription/order-prescription/pay-order',
		data: data || {},
		custom: {
			title: "支付处方",
			authentication: true
		}
	});
}

export function getPrescriptionList(params) {
	return request.get({
		url: '/app-api/prescription/order-prescription/get-my-prescriptions',
		params: params || {},
		custom: {
			title: "获取处方列表",
			authentication: true
		}
	});
}

export function getPrescriptionDetails(params) {
	return request.get({
		url: '/app-api/prescription/order-prescription/get-prescriptions-detail',
		params: params || {},
		custom: {
			title: "获取处方详情",
			authentication: true
		}
	});
}

export function getPrescriptionLogisticsInfo(params) {
	return request.get({
		url: '/app-api/prescription/order-prescription/get-order-routes',
		params: params || {},
		custom: {
			title: "获取处方物流",
			authentication: true
		}
	});
}

export function getDiagnosisInfoData(params) {
	return request.get({
		url: '/app-api/prescription/diagnosis-info/get-diagnosis-info',
		params: params || {},
		custom: {
			title: "搜索诊断",
			authentication: true
		}
	});
}